package com.liqi.controller;

import com.liqi.service.StockingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StockingController {

    @Autowired
    private StockingService stockingService;


    @PutMapping("{num}/{id}")
    public int decreNum(@PathVariable  Integer num,@PathVariable Integer id){
        System.err.println(num+"=="+id);
        return stockingService.decreNum(num, id);
    }

}
